import {
    Request
} from "../utils/request";


//主页中  统计接口
export const home = (data) => Request({
    // url:"http://adminv2.happymmall.com/manage/statistic/base_count.do",
    // url:"http://adminv2.happymmall.com/manage/product/list.do",
    url: "/api/statistic/base_count.do",
    method: "get",
    data: data
})


//登录  
export const login = (data) => Request({
    url: `/api/user/login.do`,
    method: "post",
    params: data
})


//商品管理
export const comm = (data) => Request({
    url: `/api/product/list.do`,
    method: "get",
    params: data
})
//商品搜素
export const commsearch = (data) => Request({
    url: `/api/product/search.do`,
    method: "get",
    params: data
})
//商品详情
export const shopDetail = (data) => Request({
    url: `/api//product/detail.do`,
    method: "get",
    params: data
})
//商品详情 一级二级
export const addShop = (data) => Request({
    url:`api/category/get_category.do`,
    method:"get",
    params:data
})
//商品添加 回调
export const editShop = (data) => Request({
    url:`/api/product/save.do`,
    method:"get",
    params:data
})
//商品下架 上架
export const changeStatus = (data) => Request({
    url: `/api/product/set_sale_status.do`,
    method: "get",
    params: data
})



//品类管理
export const cates = (data) => Request({
    url: `api/category/get_category.do`,
    method: "get",
    params: data
})
//品类修改
export const updateClassify = (data) => Request({
    url: `api/category/set_category_name.do`,
    method: "get",
    params: data
})
//品类添加 confirmAdd
export const confirmAdd = (data) => Request({
    url: `api//category/add_category.do`,
    method: "get",
    params: data
})


//订单管理
export const order = (data) => Request({
    url: `/api/order/list.do`,
    method: "get",
    params: data
})

//订单详情 getOrderDetail 
export const getOrderDetail= (data) => Request({
    url: `/api/order/detail.do`,
    method: "get",
    params: data
})


//用户管理    不传参    传参
export const users = (data) => Request({
    url: `/api/user/list.do`,
    method: "post",
    params: data
})
